from lexer.token.token_type import TokenType

class Function:
    def __init__(self,
                 isExterned: bool,
                 type: TokenType,
                 name: str,
                 parameterList: list):
        self.isExterned = isExterned
        self.returnValueType = type
        self.name = name
        self.parameterList = parameterList

        self.maxDepth = 0
        self.curEsp = 0
        self.scopeEsp = []

        # 为了简单，函数的返回值是放到栈上的一个变量，在函数返回的时候，只需要从
        # 这个变量读取值，然后放到rax上面即可
        self.returnVariable = None

        self.statementList = []
